﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WizardAdd.aspx.cs" Inherits="BaseSystem.WizardAdd" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
    <script runat="server">

    void OnNext(object sender, WizardNavigationEventArgs e)

    {

        //Display information at the end.

        if (UserWizard.WizardSteps[e.NextStepIndex].StepType == WizardStepType.Finish)

        {

            StringBuilder sb = new StringBuilder("");

            sb.AppendFormat("Name：{0}<br/>", Name.Text);

            sb.AppendFormat("Job：{0}<br />", Seat.Text);

            sb.AppendFormat("Mail：{0}<br />", Mail.Text);

            sb.AppendFormat("Mobile：{0}<br />", Mobile.Text);

            sb.AppendFormat("Notes：{0}<br /><hr>", Notes.Text);

            sb.AppendFormat("<b>Add or not?</b>");

            LabMessage.Text = sb.ToString();

        }

    }

    void OnFinish(object sender, WizardNavigationEventArgs e)

    {


        LabFinish.Text = "Add Success.";

    }

</script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Wizard ID="UserWizard" HeaderText="AddUser" OnNextButtonClick="OnNext" OnFinishButtonClick="OnFinish"

                    ActiveStepIndex="0" Height="100%" runat="server"  

                    BorderWidth="0px" Font-Names="Verdana" Font-Size="0.8em" Width="100%">

                    <SideBarTemplate>

                        <div >

                            <asp:DataList runat="Server" ID="SideBarList">

                                <ItemTemplate>

                                    

                                    <asp:LinkButton runat="server" ID="SideBarButton" Font-Underline="false"></asp:LinkButton>

                                </ItemTemplate>

                            </asp:DataList>

                        </div>

                    </SideBarTemplate>

                    <WizardSteps>
                        
                        <asp:WizardStep ID="WizardStep1" runat="server" Title="Namejob">

                            <div>

                                <table>

                                    <tr>

                                        <td>

                                            name：</td>

                                        <td>

                                            <asp:TextBox runat="server" ID="Name" />

                                            <asp:RequiredFieldValidator runat="server" ID="NameValidator" Text="*" ErrorMessage=" please input your name"

                                                SetFocusOnError="True" ControlToValidate="Name" />

                                        </td>

                                    </tr>

                                    <tr>

                                        <td>

                                            job：</td>

                                        <td>

                                            <asp:TextBox runat="server" ID="Seat" />

                                            <asp:RequiredFieldValidator runat="server" ID="SeatValidator" Text="*" ErrorMessage=" please input your job"

                                                SetFocusOnError="True" ControlToValidate="Seat" />

                                        </td>

                                    </tr>

                                    <tr>

                                        <td height="60">

                                        </td>

                                        <td valign="bottom">

                                            <asp:ValidationSummary runat="server" DisplayMode="List" ID="Summary" />

                                        </td>

                                    </tr>

                                </table>

                            </div>

                        </asp:WizardStep>

                        <asp:WizardStep ID="WizardStep2" runat="server" Title="Contact">

                            <div>

                                <table>

                                    <tr>

                                        <td>

                                            Email：</td>

                                        <td>

                                            <asp:TextBox runat="server" ID="Mail" /></td>

                                    </tr>

                                    <tr>

                                        <td>

                                            Mobile：</td>

                                        <td>

                                            <asp:TextBox runat="server" ID="Mobile" /></td>

                                    </tr>

                                    <tr>

                                        <td>

                                        </td>

                                    </tr>

                                </table>

                            </div>

                        </asp:WizardStep>

                        <asp:WizardStep ID="WizardStep3" runat="server" Title="Note">

                            <div>

                                <table>

                                    <tr>

                                        <td valign="top">

                                            Note：</td>

                                        <td>

                                            <asp:TextBox runat="server" ID="Notes" Rows="6" Columns="18" TextMode="MultiLine" /></td>

                                    </tr>

                                </table>

                            </div>

                        </asp:WizardStep>

                        <asp:WizardStep ID="WizardStep4" runat="server" StepType="Finish" Title="Finish">

                            <div>

                                <asp:Label runat="server" ID="LabMessage" />

                            </div>

                        </asp:WizardStep>

                        <asp:WizardStep ID="WizardStep5" runat="server" StepType="Complete" Title="Complete">

                            <div>

                                <asp:Label runat="server" ID="LabFinish" />

                            </div>

                        </asp:WizardStep>

                    </WizardSteps>
                    <StepStyle VerticalAlign=Top HorizontalAlign=Left />

                    <SideBarStyle BackColor="#D7E3F6" Font-Size="0.9em" VerticalAlign="Top" Width="10%" />

                    <NavigationButtonStyle  BackColor="#D7E3F6" BorderColor="#D7E3F6" BorderStyle="Solid" 

                        BorderWidth="1px" Font-Names="Verdana" Font-Size="Medium"  />

                    <SideBarButtonStyle ForeColor="White" />

                    <HeaderStyle  BackColor="#A2BFE9" BorderColor="#FFFBD6" BorderStyle="Solid"

                        BorderWidth="2px" Font-Bold="True" Font-Size="0.9em" ForeColor="#333333" HorizontalAlign="Center" />

                </asp:Wizard>
    
    </div>
    </form>
</body>
</html>
